/*
 * File:   Box2dCollider.cpp
 * Author: Elevator
 *
 * Created on 30 Май 2013 г., 1:43
 */

#include "Box2dCollider.h"
#include <Box2D/Box2D.h>

namespace physics {

	Box2dCollider::Box2dCollider( b2Fixture* fixture ) :
	_fixture( fixture ) {
	}

	Box2dCollider::~Box2dCollider( ) {
	}

	const IShape* Box2dCollider::GetShape( ) const {
		return _shape;
	}

	void Box2dCollider::SetShape( const IShape* shape ) {
		_shape = dynamic_cast<const Box2dShape*> ( shape );
	}

	float Box2dCollider::GetFriction( ) const {
		return _fixture->GetFriction( );
	}

	void Box2dCollider::SetFriction( float friction ) {
		_fixture->SetFriction( friction );
	}

	float Box2dCollider::GetRestitution( ) const {
		return _fixture->GetRestitution( );
	}

	void Box2dCollider::SetRestitution( float restitution ) {
		_fixture->SetRestitution( restitution );
	}

	b2Fixture* Box2dCollider::GetBox2dFixture( ) {
		return _fixture;
	}
}
